{include file="index/head" /}
<div class="box">
	<form method="post" action="" id="listform" data-type=ajax>
		<div class="box-head">
			<ul class="search">
				<li><span>搜索：</span></li>
				<li><span>使用状态</span>
					<select name="s_use" onchange="sycms.search('{:url('receive')}')">
						<option value="">使用状态</option>
						<option value="0">未使用</option>
						<option value="1">已使用</option>
						<option value="1">已过期</option>
					</select>
				</li>
				<li>
					<span>搜索关键字</span>
					<input type="text" class="intxt" name="title" placeholder="会员ID|手机号|优惠券" />
				</li>
				<li>
					<button type="button" class="btn" onclick="sycms.search('{:url('receive')}')"><i class="icon-search"></i> 搜索</button>
				</li>
			</ul>
			<a href="javascript:history.go(0);" class="btn fr"><i class="icon-refresh"></i> 刷新</a>
		</div>
		<table class="table">
			<tr>
				<th width="100">ID</th>
				<th>会员手机</th>
				<th>优惠券名称</th>
				<th>优惠券类型</th>
				<th>抵扣金额</th>
				<th>优惠券有效期(天)</th>
				<th>领取时间</th>
				<th>过期时间</th>
				<th>使用状态</th>
				<th>操作</th>
			</tr>
			{volist name="list" id="v"}
			<tr>
				<td>{$v.id}</td>
				<td>{$v.mobile}</td>
				<td>{$v.coupontitle}</td>
				<td>{$v.coupontype}</td>
				<td>{$v.couponprice}</td>
				<td>{$v.couponday}天</td>
				<td>{$v.receivetime}</td>
				<td>{$v.expiretime}</td>
				<td>
					{if condition="$v.use eq 0"}<font color='red'>未使用</font>{/if}
					{if condition="$v.use eq 1"}<font color='#007AFF'>已使用</font>{/if}
					{if condition="$v.use eq 2"}<font color='#007AFF'>已过期</font>{/if}
				</td>
				<td><a href="javascript:void(0);" onclick="sycms.del('{:url('delreceive',['id'=>$v.id])}')" class="btn red"><i
						 class="icon-trash-o"></i> 删除</a></td>
			</tr>
			{/volist}
			{if $list[0]}
			<tr>
				<td colspan="10">
					<div class="page">{$page}</div>
				</td>
			</tr>
			{/if}
		</table>
	</form>
</div>
